/*
 * @Description:
 * @Version: 1.0
 * @Autor: gaoluo
 * @Date: 2022-04-27 20:59:51
 * @LastEditors: gaoluo
 * @LastEditTime: 2022-07-25 19:22:02
 * @FilePath: /vue3.0-vite-ts-xiaotuxian/vite.config.ts
 */
import { defineConfig } from "vite";
import Components from "unplugin-vue-components/vite";
import { VantResolver } from "unplugin-vue-components/resolvers";
import vue from "@vitejs/plugin-vue";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    vue({
      reactivityTransform: true,
    }),
    Components({
      resolvers: [VantResolver()],
    }),
  ],
  server: {
    host: "0.0.0.0",
  },
  resolve: {
    alias: [
      {
        find: "@",
        replacement: "/src",
      },
      {
        find: "components",
        replacement: "/src/components",
      },
    ],
  },
});
